package com.ruibang.glass.produce.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruibang.glass.produce.domain.resp.MonitorRuleResp;
import com.teaming.cloud.framework2.common.pojo.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 设备监测点信息
 * </p>
 *
 * @author 此代码为自动生成
 * @since 2019-11-14
 */
@Data
@ApiModel
@TableName(value = "g_produce_monitor_point")
public class MonitorPoint extends BaseEntity implements Serializable {

    @ApiModelProperty(value = "监测点Id")
    @TableId(value = "monitor_id", type = IdType.ASSIGN_ID)
    private String monitorId;

    @ApiModelProperty(value = "监测点代码")
    private String monitorCode;

    @ApiModelProperty(value = "监测点名称", required = true)
    @NotBlank(message = "监测点名称不可为空！")
    private String monitorName;

    @ApiModelProperty(value = "监测点简称")
    private String shortName;

    @ApiModelProperty(value = "设备Id")
    private String deviceId;

    @ApiModelProperty(value = "设备监测类型Id")
    private String typeId;

    @ApiModelProperty(value = "状态 0:禁用，1:启用")
    private Integer status;

    @ApiModelProperty(value = "显示类型0:显示数字，1：显示中文")
    private Integer showType;

    @ApiModelProperty(value = "监测点单位")
    private String unit;

    @ApiModelProperty(value = "监测点来源(1:PLC,2:传感器)")
    private String monitorSource;

    @ApiModelProperty(value = "算术符号( + - * / ||)")
    private String calc;

    @ApiModelProperty(value = "算术系数")
    private Double modulus;

    @ApiModelProperty(value = "排序码")
    private Integer orderNum;

    @ApiModelProperty(value = "采集点位")
    private String collectPoint;

    @ApiModelProperty(value = "采集ip")
    private String collectIp;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "监测点类型（组合趋势图类型分辨）")
    private String monitorType;

    @ApiModelProperty(value = "保存规则id")
    @TableField(exist = false)
    private List<String> ruleIds;

    @ApiModelProperty(value = "监测点规则")
    @TableField(exist = false)
    private List<MonitorRuleResp> monitorRuleResp;

    @ApiModelProperty(value = "设备监测类型名称")
    @TableField(exist = false)
    private String typeName;

    @ApiModelProperty(value = "设备名称")
    @TableField(exist = false)
    private String deviceName;

}
